<%--
 *  File:    KPIConfigHeader.jsp
 *  @Author: TendyHu
 *  Date:    2010/11/05
 *
 *  Copyright (C) 2000 - 2010 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java"%>
<%@ page import="java.util.*"%>
<%@ page import="org.apache.log4j.Category"%>

<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval"%>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom"%>

<%
  //init param
  Category cat = Category.getInstance("jsp.KPIConfigHeader");
  String privilegeCode = "p0101";
  String strModuleName = "CRM";
  
  String contextPath = request.getContextPath();
%>

<%
    HashMap CurUserInfo=(HashMap)session.getAttribute("userinfo");
    if(CurUserInfo==null)
        CurUserInfo=new HashMap();
    cat.debug("CurUserInfo is:"+CurUserInfo);
 %>

<%@ include file="/inc/Security.inc"%>
<%@ include file="/inc/PageDefault.inc"%>
<%
    String strOrgid=request.getParameter("orgid");    
    String strLanguagecode=request.getParameter("languagecode");    
    String strInfo=request.getParameter("info");
    String strIsNew=request.getParameter("isNew");
   
    String strParam="";
    if( strLanguagecode==null)
        strLanguagecode="cn";
    strParam+="&languagecode="+strLanguagecode;
    
    if(strOrgid!=null)
        strParam+="&orgid="+strOrgid;
    if(strInfo!=null)
        strParam+="&info="+strInfo;
    if(strIsNew!=null)
        strParam+="&isNew="+strIsNew;
   
%>
<html>
<head>
<title>org</title>
<%if(strOrgid!=null){%>
<PageFlow:CheckPageFlow pageName="p_visitprocessmain" />
<%}%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet"
	href="<%=contextPath%>/css/<%= strLanguageCode %>/main.css"
	type="text/css">
<script language="javascript">
function page_none()
{
    alert('<%=message.getMessageDesc("SAVE_INFO_FIRST")%>');
    return;
}
function page_back()
{
  if(parent.opener != null)
    window.close();
  else
    parent.location.href = "KPIConfig.jsp?<%= OvalTools.randomURL() %>&orgid=<%=JspHelper.filterNull(strOrgid)%>&languagecode=<%=strLanguageCode%>";
}

function clicked(obj){
var type=obj.id;
<%if(strOrgid!=null){%>
        if (type == "A01"){
            <%if(strInfo!=null && strInfo.equalsIgnoreCase("Y")){%>
               parent.down1.location.href="KPIConfigMain.jsp?<%= OvalTools.randomURL() %><%=JspHelper.filterNull(strParam )%>";
           <%}else{%>
               parent.down1.location.href="KPIConfigMain.jsp?<%= OvalTools.randomURL() %><%=JspHelper.filterNull(strParam )%>";
           <%}%>
         }else if (type == "A02"){
               parent.down1.location.href="KPICalDetailSetting.jsp?<%= OvalTools.randomURL() %>&orgid=<%=JspHelper.filterNull(strOrgid)%>&languagecode=<%=strLanguageCode%>";
         }
    <%}else{%>
        page_none();
    <%}%>
}
</script>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="cform" method="post" action="<%=contextPath%>/Dispatcher"><input
	type="hidden" name="pagename" value="p_kpiconfigmain"> <input
	type="hidden" name="actionname"> <input type="hidden"
	name="languagecode" value="<%= strLanguageCode %>"> <%
 strLanguagecode=strLanguageCode;
 
 if(strOrgid!=null)
 { 
 %> <input type="hidden" name="info"
	value="<%=JspHelper.filterNull((strInfo==null)?"":strInfo)%>"> <input
	type="hidden" name="orgid"
	value="<%=JspHelper.filterNull((strOrgid==null)?"":strOrgid)%>">
	<input
	type="hidden" name="isNew"
	value="<%=JspHelper.filterNull((strIsNew==null)?"":strIsNew)%>">
	 <%}%>

<table width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td valign="top" height="19">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="summary_top"></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td><%
            Vector vec = new Vector();
            HashMap tabHash = new HashMap();           
            HashMap tabHash2 = new HashMap();
                       
            tabHash.put("id","A01");
            tabHash.put("label","L_BasicInfo");
            
            tabHash2.put("id","A02");
            tabHash2.put("label","L_CountDetail");
                      
            vec.add(tabHash);
            vec.add(tabHash2);
                  
        %> <custom:tab vecAttr="<%=vec%>" defaultID="A01" /></td>
	</tr>
</table>
</form>
</body>
</html>
